home *** CD-ROM | disk | FTP | other *** search
- unit Docomps;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, Grids, Buttons, Toolbar, ExtCtrls;
-
- type
- TDocumentComponents = class(TForm)
- Toolbar1: TToolbar;
- ToolButton1: TToolButton;
- StringGrid1: TStringGrid;
- procedure ToolButton1Click(Sender: TObject);
- procedure FormActivate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- DocumentComponents: TDocumentComponents;
-
- implementation
-
- uses SixDs,tbltimed,pasutils;
-
- {$R *.DFM}
-
- procedure TDocumentComponents.ToolButton1Click(Sender: TObject);
- begin
- close;
- end;
-
- procedure TDocumentComponents.FormActivate(Sender: TObject);
- var
- i,n:integer;
- begin
- with StringGrid1 do begin
- ColCount:=4;
- cells[0,0]:='#';
- cells[1,0]:='Class';
- cells[2,0]:='Name';
- cells[3,0]:='Value';
- ColWidths[0]:=40;
- n:=width-ColWidths[0]-5*GridLineWidth;
- i:=n div 3;
- ColWidths[1]:=i;
- ColWidths[2]:=i;
- ColWidths[3]:=n-2*i;
- with DSForm do begin
- n:=ComponentCount;
- RowCount:=n;
- DefaultRowHeight:=18;
- DocumentComponents.ClientHeight:= RowCount * (DefaultRowHeight+GridLineWidth)
- + DocumentComponents.Toolbar1.Height +GridLineWidth;
- for i:=1 to n do
- with rows[i] do begin
- Strings[0]:=inttostr(i);
- if components[i-1] is TTableTStamped then
- with TTableTStamped(components[i-1]) do begin
- Strings[1]:=ClassName;
- Strings[2]:=Name;
- Strings[3]:=inttostr(instancesize); {boolstring[(LoginTableInfo=nil)];}
- end
- else
- with components[i-1] do begin
- Strings[1]:=ClassName;
- Strings[2]:=Name;
- Strings[3]:=inttostr(instancesize);
- end;
- end;
- end;
- end;
- end;
-
- end.
-